# -*- coding: utf-8 -*-

from multiprocessing import Process, Lock

def printt(lock, num):
    lock.acquire()
    print 'hello Num: %s' % num
    lock.release()

if __name__ == '__main__':
    lock = Lock()
    [Process(target=printt, args=(lock, i)).start() for i in range(20)]